/*
 * @Author: NaturalHulk 2066634567@qq.com
 * @Date: 2024-10-15 14:54:06
 * @LastEditors: NaturalHulk 2066634567@qq.com
 * @LastEditTime: 2024-12-11 10:37:35
 * @FilePath: /xhs-mom-new/src/api/order/producManaga/producManaga.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from '@/utils/request'

// 生产计划/样品计划列表
export function getListAPI(params) {
  return request({
    url: '/order/productPlan/getList',
    method: 'GET',
    params
  })
}

// 生产计划带出订单
export function getPlanOrderAPI(params) {
  return request({
    url: '/order/sales-order/getPlanOrder',
    method: 'GET',
    params
  })
}

// 样品计划带出订单
export function getsampleManagementAPI(params) {
  return request({
    url: '/order/sample-management/getPlanOrder',
    method: 'GET',
    params
  })
}

// 新增
export function AddDataAPI(data) {
  return request({
    url: '/order/productPlan/add',
    method: 'POST',
    data
  })
}

// 生产计划查看
export function DetailDataAPI(data) {
  return request({
    url: '/order/productPlan/view/' + data,
    method: 'GET'
  })
}

// 生产计划修改
export function EditDataAPI(data) {
  return request({
    url: '/order/productPlan/edit',
    method: 'PUT',
    data
  })
}

// 删除
export function DelDataAPI(data) {
  return request({
    url: '/order/productPlan/delete',
    method: 'delete',
    data
  })
}

// 提交审核
export function submitAPI(data) {
  return request({
    url: '/order/productPlan/submit',
    method: 'POST',
    data
  })
}

// 撤销审核
export function deleteReviewAPI(data) {
  return request({
    url: '/order/productPlan/deleteReview/' + data,
    method: 'PUT'
  })
}

//审核
export function productPlanReviewAPI(data) {
  return request({
    url: '/order/productPlan/productPlanReview',
    method: 'POST',
    data
  })
}

// 终止
export function terminateAPI(data) {
  return request({
    url: '/order/productPlan/terminate',
    method: 'PUT',
    data
  })
}

// 生成完工入库单
export function addWipAPI(data) {
  return request({
    url: '/order/productPlan/addWip',
    method: 'PUT',
    data
  })
}

// 生成半成品入库单
export function semiFinishedProductAPI(data) {
  return request({
    url: '/order/productPlan/semiFinishedProduct',
    method: 'POST',
    data
  })
}

// 金蝶数据推送
export function pushAPI(data) {
  return request({
    url: '/order/productPlan/push',
    method: 'PUT',
    data
  })
}
